package hcn.protocol.brandnew.zhenliao.yaopin;

import com.fasterxml.jackson.annotation.JsonFormat;
import ctd.util.xml.jaxb.DateTimeAdapter;
import lombok.Data;
import org.atag.sysrouter.annotation.DictionaryMapping;

import javax.xml.bind.annotation.*;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import java.util.Date;
import java.util.List;


/**
 * 用药信息查询-响应消息(成功) - ODS_03020004_SUC
 *
 * @author enjoyLife
 */
@Data
@XmlRootElement(name = "Data")
@XmlAccessorType(XmlAccessType.FIELD)
public class QueryHistoryPrescriptionListResponse {

    /**
     * 总条数
     */
    @XmlElement(name = "Total")
    private String total;
    /**
     * 药品列表
     */
    @XmlElementWrapper(name = "Drugs")
    @XmlElement(name = "Drug")
    private List<Drug> drugs;

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class Drug {

        /**
         * 就诊机构
         */
        @XmlElement(name = "VisitOrganization")
        private String visitOrganization;
        /**
         * 就诊机构名称
         */
        @XmlElement(name = "VisitOrganizationName")
        private String visitOrganizationName;
        /**
         * 身份证件类别代码
         */
        @XmlElement(name = "IdCardCode")
        @DictionaryMapping(id = "CV02_01_101")
        private String idCardCode;
        /**
         * 身份证件号码
         */
        @XmlElement(name = "IdCard")
        private String idCard;
        /**
         * 处方开立日期
         */
        @XmlElement(name = "PrescriptionDate")
        @XmlJavaTypeAdapter(DateTimeAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date prescriptionDate;
        /**
         * 本人姓名
         */
        @XmlElement(name = "Name")
        private String name;
        /**
         * 性别代码
         */
        @XmlElement(name = "Sex")
        private String sex;
        /**
         * 本人电话号码
         */
        @XmlElement(name = "PatientPhone")
        private String patientPhone;
        /**
         * 诊疗卡类型
         */
        @XmlElement(name = "MedicalCardType")
        private String medicalCardType;
        /**
         * 就诊卡号
         */
        @XmlElement(name = "MedicalCardID")
        private String medicalCardID;
        /**
         * 科室代码
         */
        @XmlElement(name = "VisitDeptId")
        private String visitDeptId;
        /**
         * 科室名称
         */
        @XmlElement(name = "VisitDeptName")
        private String visitDeptName;
        /**
         * 处方开立医师签名
         */
        @XmlElement(name = "PrescriptionDoctor")
        private String prescriptionDoctor;
        /**
         * 临床诊断
         */
        @XmlElement(name = "ClinicalDiagnosis")
        private String clinicalDiagnosis;
        /**
         * 地址
         */
        @XmlElement(name = "Address")
        private String address;
        /**
         * 药物类型代码
         */
        @XmlElement(name = "DrugType")
        private String drugType;
        /**
         * 业务类别
         */
        @XmlElement(name = "BusType")
        private String busType;
        /**
         * 就诊流水号
         */
        @XmlElement(name = "VisitId")
        private String visitId;
        /**
         * 门（急）诊号
         */
        @XmlElement(name = "ClinicId")
        private String clinicId;
        /**
         * 住院号码
         */
        @XmlElement(name = "HospizationId")
        private String hospizationId;
        /**
         * 药品明细序号
         */
        @XmlElement(name = "DrugDetailId")
        private String drugDetailId;
        /**
         * 药物名称
         */
        @XmlElement(name = "DrugName")
        private String drugName;
        /**
         * 药品产地id
         */
        @XmlElement(name = "DrugProductionPlaceId")
        private String drugProductionPlaceId;
        /**
         * 药品-药品产地
         */
        @XmlElement(name = "DrugProductionPlace")
        private String drugProductionPlace;
        /**
         * 药物规格
         */
        @XmlElement(name = "DrugSpecifications")
        private String drugSpecifications;
        /**
         * 药品-药房单位
         */
        @XmlElement(name = "DrugstoreUnit")
        private String drugstoreUnit;
        /**
         * 药品单价
         */
        @XmlElement(name = "DrugUnitPrice")
        private String drugUnitPrice;
        /**
         * 默认一次计量
         */
        @XmlElement(name = "DefaultOnceDosage")
        private String defaultOnceDosage;
        /**
         * 一次剂量
         */
        @XmlElement(name = "OnceDosage")
        private String onceDosage;
        /**
         * 剂量单位
         */
        @XmlElement(name = "DosageUnit")
        private String dosageUnit;
        /**
         * 药物发放数量
         */
        @XmlElement(name = "DrugSendNumber")
        private String drugSendNumber;
        /**
         * 药品-用药天数
         */
        @XmlElement(name = "MedicineDays")
        private Short medicineDays;
        /**
         * 药物使用频次代码
         */
        @XmlElement(name = "DrugUsingRate")
        private String drugUsingRate;
        /**
         * 药物使用途径代码
         */
        @XmlElement(name = "DrugUsePathwaysCode")
        private String drugUsePathwaysCode;
        /**
         * 药品用法名称
         */
        @XmlElement(name = "DrugUsePathwaysName")
        private String drugUsePathwaysName;
        /**
         * 使用频次名称
         */
        @XmlElement(name = "DrugUsingRateName")
        private String drugUsingRateName;
        /**
         * 代煎标志
         */
        @XmlElement(name = "BoilSign")
        private Byte boilSign;
        /**
         * 药品煎法名称
         */
        @XmlElement(name = "HerbalMedicineDecoctionName")
        private String herbalMedicineDecoctionName;
        /**
         * 草药脚注
         */
        @XmlElement(name = "HerbalFootNote")
        private String herbalFootNote;
        /**
         * 中药饮片剂数
         */
        @XmlElement(name = "PiecesChineseMedicineAgentNumb")
        private Byte piecesChineseMedicineAgentNumb;
        /**
         * 处方药品组号
         */
        @XmlElement(name = "DrugsGroupNumber")
        private String drugsGroupNumber;
        /**
         * 药品顺序号
         */
        @XmlElement(name = "SortNumber")
        private String sortNumber;
        /**
         * 备注信息
         */
        @XmlElement(name = "Remarks")
        private String remarks;
    }

}
